package com.jt.util;

import com.jt.pojo.User;

/**
 * @author Cx
 * @stage JT Of Fourth stage
 * @creat 2020-12-17 11:34
 */
public class UserThreadLocal {

    private static ThreadLocal<User> threadLocal = new ThreadLocal<>();

    public static void setUser(User user) {
        threadLocal.set(user);
    }

    public static User getUser() {
        return threadLocal.get();
    }

    public static void remove() {
        threadLocal.remove();
    }

}
